#include<bits/stdc++.h>

using namespace std;


using ll = long long;
#define endl '\n'
template<typename T=int>
inline T read() {
    T x;
    cin >> x;
    return x;
}
void select_sort(int*a,int *b){
    if(a==b)return ;
    int *k=min_element(a,b+1);
    swap(*a,*k);
    select_sort(a+1,b);

}

int main() {
    int a[]={1,3,5,7,9,2,4,6,8,0};
    int n=10;
   select_sort(a,a+9);
    copy(a,
         a+10,
         ostream_iterator<int>(cout," "));

    return 0;
}
